Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

resolved the issue

Hi,
thanks for your inputs and responses.. it was of great help !I finally got it working using the doc.getItems and doc.getAttachment() properties.. I am pasting the code snippet for your reference :

if(doc.hasItem("$FILE"))
{
Vector items = doc.getItems();
for (int j=0; j<items.size(); j++) {
Item item = (Item)items.elementAt(j);
if(item.getName().equals("$FILE")){
System.out.println("document contains an attachment :");
EmbeddedObject eo = doc.getAttachment(item.getValueString());
if(eo!=null){
//check if the object is a file attachment
String type = getObjectType(eo);
log.info("\t\tNon RichTextItem : Type: " + type);
if (type.equals("file attachment")){
eo.extractFile("C:\\extracts\\"+eo.getSource());
}
}
}
}
}


Feedback response number WEBB7PRMHE created by ~Tony Frogeroskiader on 03/02/2009

URGENT : How to extract file attach... (~Tony Frogerosk... 23.Feb.09)
. . notesdocument.embeddedobjects (~Vanessa Kiwete... 23.Feb.09)
. . . . alternately... (~Laura Deskiski... 24.Feb.09)
. . . . . . resolved the issue (~Tony Frogerosk... 2.Mar.09)
. . . . . . . . URGENT (~Alexis Ekvelug... 22.Jul.14)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS